﻿using System;

namespace LearnSealed
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
        }
    }

    class Father
    {
        public virtual void DoSomething()
        {
            Console.WriteLine($"{nameof(Father)}.Work");
        }
    }

    class Son : Father
    {
        public sealed override void DoSomething()
        {
            Console.WriteLine($"{nameof(Son)}.Learn");
        }
    }

    class Grandson : Son
    {
        public new void DoSomething()
        {
            Console.WriteLine($"{nameof(Grandson)}.Learn");
        }
    }
}
